class ListByPropIdHistoryModel {
  List<ListByPropIdHistoryItem>? list;
  int? pageNum;
  int? pageSize;
  int? total;
  int? totalPage;

  ListByPropIdHistoryModel({
    this.list,
    this.pageNum,
    this.pageSize,
    this.total,
    this.totalPage,
  });

  ListByPropIdHistoryModel.fromJson(Map<String, dynamic> json) {
    if (json["list"] is List) {
      list =
          json["list"] == null
              ? null
              : (json["list"] as List)
                  .map((e) => ListByPropIdHistoryItem.fromJson(e))
                  .toList();
    }
    if (json["pageNum"] is num) {
      pageNum = (json["pageNum"] as num).toInt();
    }
    if (json["pageSize"] is num) {
      pageSize = (json["pageSize"] as num).toInt();
    }
    if (json["total"] is num) {
      total = (json["total"] as num).toInt();
    }
    if (json["totalPage"] is num) {
      totalPage = (json["totalPage"] as num).toInt();
    }
  }

  static List<ListByPropIdHistoryModel> fromList(
    List<Map<String, dynamic>> list,
  ) {
    return list.map(ListByPropIdHistoryModel.fromJson).toList();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    if (list != null) {
      _data["list"] = list?.map((e) => e.toJson()).toList();
    }
    _data["pageNum"] = pageNum;
    _data["pageSize"] = pageSize;
    _data["total"] = total;
    _data["totalPage"] = totalPage;
    return _data;
  }
}

class ListByPropIdHistoryItem {
  String? invalidDate;
  String? propImageUrl;
  String? title;
  String? useDate;
  int? useType;

  ListByPropIdHistoryItem({
    this.invalidDate,
    this.propImageUrl,
    this.title,
    this.useDate,
    this.useType,
  });

  ListByPropIdHistoryItem.fromJson(Map<String, dynamic> json) {
    if (json["invalidDate"] is String) {
      invalidDate = json["invalidDate"];
    }
    if (json["propImageUrl"] is String) {
      propImageUrl = json["propImageUrl"];
    }
    if (json["title"] is String) {
      title = json["title"];
    }
    if (json["useDate"] is String) {
      useDate = json["useDate"];
    }
    if (json["useType"] is num) {
      useType = (json["useType"] as num).toInt();
    }
  }

  static List<ListByPropIdHistoryItem> fromList(
    List<Map<String, dynamic>> list,
  ) {
    return list.map(ListByPropIdHistoryItem.fromJson).toList();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["invalidDate"] = invalidDate;
    _data["propImageUrl"] = propImageUrl;
    _data["title"] = title;
    _data["useDate"] = useDate;
    _data["useType"] = useType;
    return _data;
  }
}
